﻿@model IEnumerable<Enterprise.Management.DP_User>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section header{
}
<h2>Index</h2>

<p>
    @Html.ActionLink("Create New User", "CreateUser")
</p>
<p>
    @Html.ActionLink("Create New Category", "CreateCatetory")
</p>

<table>
    <tr>
        <th>
            用户名
        </th>
        <th>
            用户邮箱
        </th>
        <th>
            部门
        </th>
        
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.User_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User_Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DP_Category.Category_Name)
        </td>
        
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.User_ID }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.User_ID })
        </td>
    </tr>
}

</table>

